import { MessageType, UserType, BaseMessage } from '@/hooks/stomp/typs'
export interface ApiMessageShop {
    id: string
    shopId: string
    shopLogo: string
    shopName: string
    show: boolean
    lastTime: string
    lastMessage?: Message
}

/**
 * 工具栏内容类型枚举
 */
export enum ToolbarMessageType {
    //表情
    EXPRESSION,
    //图片
    IMAGE,
}

/**
 * 工具栏内容
 */
export interface ToolbarMessage {
    type: ToolbarMessageType
    content: string
}

export interface ChatMessage {
    messageType: keyof typeof MessageType
    message: string
}

/**
 * 聊天消息
 */
export interface Message {
    id: string
    shopId: string
    adminId: string
    userId: string
    senderType: UserType
    receiverType: UserType
    messageType: MessageType
    message: string
    read: boolean
    createTime: string
}

/**
 * 店铺管理员与消息列表
 */
export interface MessageShopAdmin {
    id: string
    userId: string
    nickname: string
    messages: Array<Message>
}

export interface TargetTypeConfig {
    isConsumer: boolean
}

export interface ShopSalesServiceMessage extends BaseMessage {
    shopId: string
}
export type ShopData = { useid: string; shopLogo: string; shopName: string }
export interface CurrentProduct {
    pic: string
    id: string
    name: string
    salePrices: string[]
    my?: boolean
    h5?: boolean
    price: {
        estimate: Long
        items: {
            desc: string
            price: number
        }[]
        skuPrice: number
        underlined: number
    }
}
